﻿/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/


CKEDITOR.editorConfig = function( config ) {
	config.removePlugins = 'scayt';	
	config.extraPlugins = 'fileicon';
	config.filebrowserImageUploadUrl = '../ckfinder/ckfinder.html?Type=Images&CKEditor=editor1&CKEditorFuncNum=1&langCode=en-gb';
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	
	//config.extraPlugins = 'MediaEmbed';

	config.toolbar = 'MyToolbar';

	config.toolbar_MyToolbar =
	[
		 ['Source','-','Save','NewPage','Preview','-','Templates', 'fileicon'],
		 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
		 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
		  '/',
		 ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
		  '/',
		 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
		 ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
		 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
		 ['Link','Unlink','Anchor'],
		 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
		 '/',
		 ['Styles','Format','Font','FontSize'],
		 ['TextColor','BGColor'],
		 ['Maximize', 'ShowBlocks','-','MediaEmbed','About']


	];

};

CKEDITOR.on( 'dialogDefinition', function( ev ) {
  // Take the dialog name and its definition from the event
  // data.
  var dialogName = ev.data.name;
  var dialogDefinition = ev.data.definition;

  // Check if the definition is from the dialog we're
  // interested on (the Link and Image dialog).
  if ( dialogName == 'link' || dialogName == 'image' ) {
	 // remove Upload tab
	 dialogDefinition.removeContents( 'Upload' );
  }
});

